import service from '@/utils/request'

// @Tags Procdef
// @Summary 创建审批流程
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Procdef true "创建审批流程"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /procdef/createProcdef [post]
export const createProcdef = (data) => {
  return service({
    url: '/procdef/createProcdef',
    method: 'post',
    data
  })
}

// @Tags Procdef
// @Summary 删除审批流程
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Procdef true "删除审批流程"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /procdef/deleteProcdef [delete]
export const deleteProcdef = (params) => {
  return service({
    url: '/procdef/deleteProcdef',
    method: 'delete',
    params
  })
}

// @Tags Procdef
// @Summary 批量删除审批流程
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除审批流程"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /procdef/deleteProcdef [delete]
export const deleteProcdefByIds = (params) => {
  return service({
    url: '/procdef/deleteProcdefByIds',
    method: 'delete',
    params
  })
}

// @Tags Procdef
// @Summary 更新审批流程
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Procdef true "更新审批流程"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /procdef/updateProcdef [put]
export const updateProcdef = (data) => {
  return service({
    url: '/procdef/updateProcdef',
    method: 'put',
    data
  })
}

// @Tags Procdef
// @Summary 用id查询审批流程
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.Procdef true "用id查询审批流程"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /procdef/findProcdef [get]
export const findProcdef = (params) => {
  return service({
    url: '/procdef/findProcdef',
    method: 'get',
    params
  })
}

// @Tags Procdef
// @Summary 分页获取审批流程列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取审批流程列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /procdef/getProcdefList [get]
export const getProcdefList = (params) => {
  return service({
    url: '/procdef/getProcdefList',
    method: 'get',
    params
  })
}
